
  PROGRAM: COMPORT V2.5 -- Manipulate and Display COM and LPT Port Info

           For COM ports, displays UART type, IRQ used.  Allows addition or
           removal of COM and LPT ports from DOS at any address.  Netware,
           LANtastic, and LAN Manager aware.

  This manual is approximately 15 pages long, and contains the following
  sections.  We do, of course, suggest you read it thoroughly at some point:

          Section 1.0 Introduction -- What you're reading now;
          Section 2.0 Installation -- How to install COMPORT;
          Section 3.0 Tutorial -- Background on the BDA, UARTs, etc.
          Section 4.0 Usage -- Full details on all COMPORT options, defaults,
                  and how they work;
          Section 5.0 Changes

  1.0 Introduction

  This is a professionally developed piece of software, created and
  maintained by OSR Open Systems Resources, Inc. one of the top network
  software development and consulting companies.  We're most interested in
  hearing feedback, comments, and input from all registered users.

  COMPORT is a utility that enables the easy and flexible management of
  serial (COM) and parallel (LPT) ports under DOS.  COMPORT has 4 major
  functions:

          o Adds support to DOS (including DOS V6.0) for COM3, COM4, and
                  LPT3, including optionally searching for these devices
                  at their default addresses.  Many older BIOSes support
                  only COM1, COM2, LPT1 and LPT2.  COMPORT overcomes
                  these limitations;
          o Allows specification of any port address for any COM or LPT
                  port.  This allows DOS to support both non-standard
                  port addresses for any device, as well as the altering
                  of COM and LPT port numbering (COM4 can be changed to
                  COM1, for example);
          o ACCURATELY identifies the type of UART chip used or emulated by
                  each serial port;
          o ACCURATELY identifies the IRQ used by each serial port;

  These functions provide the following benefits:

          o COM3, COM4, and LPT3 are made available for use with standard
                  DOS utilities and programs on all systems, since COMPORT
                  makes their existence known to DOS;
          o DOS programs which include support for only 1 or 2 COM or LPT
                  ports (of which there are many) can use the devices
                  attached to the other ports in the system (COM3, COM4,
                  or LPT3, for example) since COMPORT allows the user
                  complete control over which device (i.e. which port
                  address) is associated with which COM or LPT number;
          o Knowing which type of UART is used in each serial port allows
                  users to better predict the maximum communications
                  throughput of their systems.
          o Knowing which IRQ is used by each serial port helps identify
                  and avoid IRQ conflicts, one of the most frequent causes
                  of problems when adding new hardware options to a
                  PC-compatible system.

  All this, and COMPORT is SHAREWARE!


  2.0 Installation
          COMPORT.DOC     This file - User documentation for COMPORT
          COMPORT.EXE     The executable COMPORT program.
  Installation simply involves unpacking the library file, and placing
  COMPORT.EXE where it can be conveniently executed, typically in a
  utility directory on your PATH.  For example, if you path statement
  is:
          PATH=C:\DOS;C:\UTILS

  You might wish to copy COMPORT.EXE to the UTILS directory so that it
  may be conveniently executed from any directory.


  3.0 DOS Communications Background (and tutorial)
  Tbis section comprises tutorial and background information about how
  DOS configures serial (COM) and parallel (LPT) ports, and how COMPORT
  modifies the BDA to make previously inaccessible ports available.  It
  also describes the different types of Universal Asynchronous Receiver
  and Transmitter (UART) chips used in different serial port implementations.

  If you're already familiar with how DOS uses the BIOS Data Area (BDA) to
  map COM and LPT numbers to port addresses, and know (or don't care about!)
  the differences between a 16540 and 16550AFN you can initially ignore this
  section and skip ahead to section 7.0 "Instructions for Using COMPORT".
  Since this section does contain information on precisely how COMPORT
  works with the BDA, it will probably be useful for you to read the section
  fully at some point, however.


  2.1 COM and LPT Name to Port Address Mapping

  Like the BIOS in the original IBM PC, many BIOSes support only 2 serial
  ports.  Some support only 1 parallel port.  However, well known default
  addresses for COM1-COM4 and LPT1-LPT3 have evolved over the years since
  the original IBM PC was built.

  To understand how COM and LPT port names are associated with addresses
  it's important to realize that the names COM1, COM2, COM3, COM4, LPT1,
  LPT2, LPT3 are really just LOGICAL names.  There are no set physical
  port addresses associated with these names.  The name to port address
  mapping is done using a table called the BIOS Data Area (BDA).

  The BDA is stored in memory (RAM), and is built by the BIOS each time
  the system is booted.  The BIOS uses its own pseudo-proprietary algorithm
  to search for serial and parallel devices at some small number of
  expected addresses.  Logical COM ports names are associated with addresses
  by checking to see if serial ports exist at various addresses.  As ports
  are found, they are assigned in turn to the next available logical COM
  device name.  Logical LPT ports are assigned addresses the exact same way,
  using a separate list of addresses.  So, for example, if the first serial
  port found in the system is discovered at address 03F8h, the address 03F8h
  is placed in the BDA in the slot corresponding to COM1.  Note that A zero
  is placed in each entry of the BDA that has no associated port.  So, for
  example, if there's no LPT3 in the system, the BDA entry for LPT3 will have
  a zero in it.

  COMPORT searches for COM and LPT ports precisely like the latest BIOSes
  do during their boot sequences.  As ports are found that had NOT been
  found by the host PC's BIOS during its boot sequence, these previously
  undiscovered ports are added to the BDA.  This addition is NOT permanent,
  and is in effect only until the PC is rebooted.  Hence COMPORT will have
  to be run each time the system is booted to add the new ports to the system.

  The serial port addresses that COMPORT searches, in order, are:
                  03F8h, 02F8h, 03E8h, 02E8h
  The parallel port addresses that COMPORT searches, in order, are:
                  03BCh, 0378h, 0278h

  When a DOS utility (such as a communications program) wants to access
  COM1, for example, the port address presently associated with COM1 in
  the BDA is retreived.  Likewise, when attempting to access one of the LPT
  ports.

  It is precisely this logical to physical port address mapping that allows
  COMPORT to add COM and LPT ports to the system, or change the association
  between a particular COM or LPT port name (like, COM1) and a particular
  physical port address (like, 03F8h).

  Ostensibily so that utilities know which of the entries in the BDA are
  valid, DOS also maintains a data structure called the Equipment List Word.
  This structure contains, among other things, a count of the number of serial
  and parallel ports found by the BIOS during its boot sequence search of
  the system.

  In practice, this Equipment List Word is inconsistently maintained and
  almost never consulted (except by programs which display how many parallel
  and serial ports exist in the system!).  After all, as it says above,
  any entry in the BDA that doesn't have a corresponding physical port
  associated with it has a zero it in.  Hence, there are a small number
  of BIOSes that always indicate 4 serial and 3 parallel ports in the
  Equipment List Word (irrespective of how many COM and LPT ports were
  actual located during boot).  Finally, there are inconsistencies as
  to how this word (and other parts of the BDA) are interpretted between
  the original PC and the PS/2.

  Just for completeness, COMPORT ensures that any changes it makes to the
  BIOS Data Area are reflected in the Equipment List Word.  However, in
  actual practice, no utility that accesses COM or LPT ports using the
  BDA really cares anymore what's in the Equipment List Word.  Also, if
  a host PC's BIOS places arbitrary numbers in the Equipment List Word
  (as in the example above, where 4 COM and 3 LPT ports are always
  indicated) COMPORT won't bother to "straighten this out".


  2.2 Types of Serial Port Chips (UARTS)

  The original IBM PC used a particular type of chip, identified as an
  NS8250 (NS = Manufactured by the National Semiconductor Company), to
  implement its serial ports.  To create "100% compatible" clones,
  many PC and board makers use either this precise chip or a work-alike
  chip to implement their serial ports.

  The 8250 has some limitations however.  It couldn't run very fast,
  and was never intended to be used above 9600 bps (the original PC's
  software enforced this limit).  A whole series of backward compatible
  upgrades to this original chip have been created, which allow the
  PC to theoreticaly communicate at speeds in excess of 690K bps.

  Using the appropriate option, COMPORT examines the UARTs used by each
  of the serial ports on the host PC and CORRECTLY identifies its type.
  Note that many well know, major vendor supplied, diagnostic and
  utility programs have algorithmic errors which cause them to mis-identify
  some specific types of UARTs.

  When COMPORT scans the serial (COM) ports in a system, it displays
  the type of each UART as one of the following types.  Note that
  "work alike" chips (i.e. chips that work precisely like, for example,
  a NS16550AFN but built by a different vendor) are identified as the
  original chip.

  Types of UARTs that COMPORT identifies:

          o "8250" -- An 8250 or compatible chip has been identified.
            The 8250 is the original, basic, serial port chip used in
            the IBM PC and many compatibles.

          o "16450" -- An NS16450, NS16550, or 8250A or compatible
            chip has been identified.  These chips are all functionally
            identical.  They are faster than the 8250, and are identified
            by the existence of a "scratch register."  As a point of
            trivia: The 16550 chip actually has a UART, but a serious
            bug in most versions of the chip prevents the FIFO from
            functioning properly.  16550 chips with non-working FIFOs
            are identified as 16450/16550s.  16550 chips with WORKING
            FIFOs are identified as 16550AFNs.

          o "16550AFN" -- An NS16550A, 16550AF, 16550AFN, or compatible
            chip has been identified.  These chips offer significant
            improvement over the 16450 series, as they provide input
            and output buffers (known as silos, or FIFOs) with programmable
            interrupt levels.  Chips of these types are identified by
            the existence of such FIFOs.  FIFOs allow support for higher
            speed communications, since interrupts can be reduced from one
            for every character sent or received, to as little as one for
            every 16 characters sent or received.  Many communications
            programs, as well as Microsoft Windows V3.1 and later, take
            advantage of the FIFO in these UARTS.  As mentioned above,
            NS16550 chips with properly working FIFOs are identified
            by COMPORT as 16550AFNs.

          o "Type 3" -- An IBM Type 3 Serial port chip or compatible
            has been identified.  These chips are the most sophisticated,
            fastest, and provide support for the highest communications
            speeds of any of the present UARTs.  Found in some IBM
            PS/2s, these chips support Direct Memory Access (DMA)
            transfers, thus freeing the CPU of the task of moving
            data from the serial port to a buffer in memory.  Serial
            port speeds in excess of 690K bps are, at least theoretically,
            possible with these enhanced serial ports.

  Note that most people who want "the fast serial port chip" in their
  systems incorrectly request boards with "16550 chips".  The 16550 doesn't
  work right, and hasn't been produced by National Semiconductor for years.
  The right chip is the 16550AFN.  While this may sound like semantics,
  the chips workings are really different.


  3.0 Instructions for Using COMPORT

  COMPORT is invoked as follows:

                  COMPORT [option[-]] [option=add]

  To invoke COMPORT with its default options, just type COMPORT followed
  by a carriage return.

  Each option is preceded by a slash ("/") or a dash ("-") character,
  which are treated identically.  Options must be separated from one
  another by at least one space on the command line.  Case is not
  significant to COMPORT, thus the options "/a" and "/A" are equivalent.
  Some options may be disabled by following the option by a minus sign.
  Thus, "/A-" specifically disables the "/A" option.

  This section contains a brief overview of the COMPORT options.  A
  complete discussion of each option follows this section.

  There are two classes of COMPORT options, "Display" options and
  "Configuration" options.

  Display options allow control of what COMPORT displays when it is
  invoked.  These options are:

          /A[-]           Display addresses of parallel and serial ports
                          known to DOS, as well as types of serial port UARTS.
                          DEFAULT = /A (enabled)

          /E[-]           Displays number of COM and LPT ports known to DOS
                          according to the BIOS Data Area Equipment List
                          Word, as COMPORT STARTS to run.  Therefore, any
                          ports found by COMPORT Configuration options are
                          not included in these counts.
                          DEFAULT = /E (enabled)

          /I[-]           Displays the IRQ (Interrupt Request Queue) number
                          associated with each COM port.
                          DEFAULT = /I- (disabled)

          /? or /H        Displays a short screen of help information.

  Configuration options give control of how COM and LPT ports are configured
  by DOS, and allow you to register your copy of COMPORT.  Configuration
  options are:

          /S[-]           Requests COMPORT to scan for additional COM and
                          LPT ports at their typical default addresses and
                          if any are found, add them to DOS.
                          DEFAULT = /S- (disabled)

          /Cn=x           Requests COMPORT to configure COM (serial) port
                          n (n=1-4) in DOS at port address x (x = hex
                          address without trailing "h" or leading "0x").
                          DEFAULT = none.

          /Ln=x           Requests COMPORT to configure LPT (parallel) port
                          n (n=1-3) in DOS at port address x (x = hex
                          address, without trailing "h" or leading "0x").
                          DEFAULT = none.

          /R=k            Allows you to REGISTER your version of COMPORT,
                          using the registration key ("k") provided to you
                          by the author.  Registering your copy of COMPORT
                          removes the gentle, but annoying, registration
                          reminder that requires that you type <CR> to
                          continue COMPORT's execution.   This option
                          supersedes any others on the command line.

  The following sections provide complete details on each option above, in
  alphabetical order.


  3.1 /A -- Show Address

  This option causes COMPORT to display a list of the COM and LPT ports
  present in the system, AFTER any COMPORT Configuration changes have
  been completed.  This list is taken directly from the BIOS Data Area
  in DOS, and hence is the actual information that will be available to
  DOS when COMPORT exits.

  The output generated by /A looks something like the following:

          COMPORT V2.5
          Copyright (c) 1993 - OSR Open Systems Resources, Inc.

          Current Port Addresses and Types:
                  COM1: 03F8h, Type=16450
                  COM2: 02F8h, Type=16450
                  COM3: 03E8h, Type=16450
                  COM4: 02E8h, Type=16550AFN

                  LPT1: 0378h
                  LPT2: 0278h
                  LPT3: (Not present -- Redirected by LAN Mgr)

  For each COM port configured in the system, COMPORT displays the port
  address and UART (Universal Asynchronous Receiver and Transmitter)
  type.  This is done non-destructively, i.e. the baud rate and setup
  information for each port is saved and restored by COMPORT.  Also,
  please note that UART type is determined CORRECTLY, unlike several
  other programs the author has tried in his frustration.

  For each LPT port configured, COMPORT displays the port address.  For
  LPT ports which are not physically present but have been redirected
  COMPORT displays a description of who's doing the redirecting (see below).

  Serial (COM) ports are identified as one of the following types.  Refer
  to section 2.2, above, for a complete description of the differences
  between these UART types.

          o "8250" -- An 8250 or compatible chip has been identified.

          o "16450" -- An NS16450, NS16550, or 8250A or compatible
            chip has been identified.

          o "16550AFN" -- An NS16550A, 16550AF, 16550AFN, or compatible
            chip has been identified.

          o "Type 3" -- An IBM Type 3 Serial port chip or compatible

  Parallel (LPT) ports which are not physically present in the system (i.e.
  there is no parallel port hardware), but whose logical names have been
  redirected to some other device, or are under the control of a network
  redirector, receive the following designations:

          o "Not present -- Redirected by LAN Mgr" -- This LPT port has no
            hardware associated with it, and is hence not physically present.
            Instead, it has been redirected by MS net, Microsoft LAN Manager,
            or Digital's Pathworks networking product.

          o "Not present -- Redirected by MODE" -- This LPT port has no
            hardware associated with it, and is hence not physically present.
            Instead, it has been redirected by the DOS MODE command, as in
            the following:
                          C:\> MODE LPT3=COM2

            In the above example, the output from LPT3 has been redirected
            to point to COM2.

          o "Not present -- Netware or LANtastic loaded" -- For LPT2 and LPT3
             only, Novell's Netware or Artisoft's LANtastic networking products
             place a special address in the BIOS Data Area when they are loaded.
             The indicated LPT port is redirected by Netware or LANtastic, and
             is not physically present on this system.


  3.2 /Cn=x -- Configure COM Port at Specified Address

  The /Cn=x option allows the user to specify the address of any serial
  port, as well the COM number that address is associated with.  This
  information is stored in the DOS BIOS Data Area, and the total number
  of ports of each type are updated in the BIOS Equipment List Word.

  For this option, "n" is the number of the COM port (1-4) and x is the
  hexadecimal address of the associated serial port.  This hex address
  may be specified in one to four hex digits, and must not include any
  "hex identifying" bytes such as a trailing "h" or leading "0x".
  Therefore, the hex address "02E8" is valid, but "0x02E8" is not and
  neither is "02E8h".  Hex address "FFFF" is used to request COMPORT
  to REMOVE the indicated serial port from the DOS BIOS Data Area
  tables (see below for this special use of /Cn=FFFF).  Specifying an
  address of zero (as in /C2=0) is not valid).

  When a user specified a serial port address using the /Cn=x option,
  COMPORT examines the provided hex port address to see if a valid COM
  port can be identified at that address.  Thus, if COMPORT is invoked
  with the command:

          COMPORT /C1=0278

  this requests that COMPORT associate address 0278 (hex) with COM1, and
  place this information in the DOS BIOS Data Area.  If a valid serial port
  is found at this address (i.e. if one of the four types of serial port
  UARTS listed above in section 3.1 can be found at the given address),
  COMPORT displays a message such as the following:

          COMPORT V2.5
          Copyright (c) 1993 - OSR Open Systems Resources, Inc.

          ...Processing manual port address options...
                  Verified COM1 at specified address 0278h (added to DOS)

  If no valid serial port can be found at the indicated location, COMPORT
  will not add the address you provide to the DOS BIOS Data Area.  COMPORT
  informs you of this by displaying a message such as the following:

          COMPORT V2.5
          Copyright (c) 1993 - OSR Open Systems Resources, Inc.

          ...Processing manual port address options...
                  ***ERROR: Did not find COM1 at specified address 0278h
                                                          (DOS not changed)

  It is important to note that in either case (valid port found, or no valid
  port found) COMPORT informs the user of whether or not the COM port was
  added to DOS.

  The /Cn=x option can also be used to request COMPORT to remove the
  indicated COM port number from the DOS internal BIOS Data Area tables,
  though we can't honestly think of a reason that anyone would need to do
  this in "real life".  The entry for the port in the BDA is set to zero
  by COMPORT.  This is done by specifying hex address "FFFF", as in:

          COMPORT /C3=FFFF

  In this case, a message similar to the following is displayed:

          COMPORT V2.5
          Copyright (c) 1993 - OSR Open Systems Resources, Inc.

          ...Processing manual port address options...
                  Removed COM3 from DOS

  COMPORT places no restriction on the number of times a single serial port
  address can be configured into the DOS tables.  Therefore, if, for example,
  a particular piece of software that you use prints to COM3 and another
  piece of software that you use prints to COM1, and neither allows you
  to change these specifications, and you wish to use the same printer
  for both (but, obviously not at the same time), you may specify:

          COMPORT /C3=03F8

  Where 03F8 is the default address for COM1, and a valid serial port
  UART exists at this location.  COMPORT will display something like
  the following:

          COMPORT V2.5
          Copyright (c) 1993 - OSR Open Systems Resources, Inc.

          Current Port Addresses and Types:
                  COM1: 03F8h, Type=16450/16550
                  COM2: 02F8h, Type=16450/16550
                  COM3: 03F8h, Type=16450/16550

  Thereby allowing the serial port at address 03F8 to be accessed as
  either COM1 or COM3.

  Finally, note that when all COM port changes are complete, the BIOS Data
  Area Equipment List Word (see /E, below) is updated with the new count of
  the ports configured in the system.  In the example directly above, the
  equipment list word would indicate 3 COM ports (even though COM1 and
  COM3 share the same address).


  3.3 /E -- Display Counts from BIOS Equipment List

  The /E option displays the numbers of serial and parallel ports as
  indicated by the DOS BIOS Equipment List word, PRIOR to COMPORTs taking
  any actions (such as manually configuring any ports or automatically
  scanning for additional ports at their default addresses).  The
  output from this option looks like the following:


          COMPORT V2.5
          Copyright (c) 1993 - OSR Open Systems Resources, Inc.

          DOS Equipment List Initially Indicates:
                  4 serial ports
                  2 parallel ports

  Users should note that the DOS Equipment List Word is notoriously
  inaccurate, and rather than rely on it, most programs simply interrogate
  the BIOS Data Area directly.


  3.4 /I -- List Associated IRQs for COM Ports

  The /I option does the same thing as /A, but adds to the Address List
  the IRQ number associated with each COM port.  The IRQ is determined
  empirically, by actually generating an interrupt on each serial port
  and determining at which address the interrupt occurs.  This is another
  area in which COMPORT differs from other programs, which often display
  the DEFAULT IRQ most often associated with the indicated device, which
  is typically pretty useless.

  Conflicting IRQs are the single most common cause of problems in
  industry standard PC systems, when adding new hardware options.
  Typically, each device that needs to be simultaneously active needs
  to have its own IRQ.  So, devices can share IRQs, but such devices
  may not be used at the same time.  Hence, it's fine to have a mouse
  attached to COM1 at IRQ 4, a modem to COM2 at IRQ3, and a printer to
  COM3 also at IRQ3.  It just will NOT be possible to use the modem on
  COM2 and the printer on COM3 at the same time (since they share IRQ3).

  The /I option to COMPORT results in a display similar to the following:

          COMPORT V2.5
          Copyright (c) 1993 - OSR Open Systems Resources, Inc.

          Current Port Addresses and Types:
                  COM1: 03F8h, Type=16450, IRQ=4
                  COM2: 02F8h, Type=16450, IRQ=3
                  COM3: 03E8h, Type=16450, IRQ=5

                  LPT1: 0378h
                  LPT2: 0278h

  Note that the /I option causes COMPORT to "take control" of specific
  interrupt vectors in your system during its testing.  For the few
  milliseconds that this test is running, COMPORT assumes that nothing
  else (mouse movement, floppy disk I/O, or network adapter activity
  for example) is happening on the system.  Hence, it is advised
  to run COMPORT with the /I option only on a "quiet" system, and not
  (for example) with your network loaded. This will ensure accuracy of
  results.  Also, if network activity is in progress when COMPORT's /I
  option is executed, interrupts could possibly be lost or disabled from
  your network interface card.

  None of these things will likely cause any damage to your system or
  software, they just might limit the cases in which you get an accurate
  COMPORT display of IRQs.

  While COMPORT attempts to leave all the serial port registers just as
  it found them this is not always completely possible, and minor
  register changes may occur.  In most cases these will be unnoticed,
  but this is another reason to not have any other software simultaneously
  accessing the COM ports while COMPORT is!

  Note that COMPORT assumes a system with a PC-AT compatible bus structure.
  Hence, if you've got an XT we give you no guarantee that the /I option
  won't hang your system.  However, if /I should work with all other
  ISA/EISA architecture machines.  We'd like to hear from you if it doesn't.

  To keep your system as safe as possible during its checks, COMPORT's /I
  option does NOT check for serial port activity at the following IRQs:

                  IRQ0    Used by the system timer
                  IRQ1    Used by the keyboard

                  IRQ8    Used by the real-time clock
                  IRQ13   Used by Floating Point Co-Processor (sometimes)
                  IRQ14   Used by the hard disk

  Hence, if you have a VERY unusual system configuration, and one of your
  serial ports uses one of the above IRQs, COMPORT will not properly
  identify the IRQ used by that port.  Also, if you have an even MORE
  unusual system configuration, and one of the above devices is set to
  an IRQ NOT listed above, COMPORT may get confused and report THAT as
  the serial port's IRQ.  Again, you'd have to have a pretty unusual
  system for that to happen... and if you have such a system you'd already
  have to know what your IRQ assignments are!

  IRQs 2 and 9: COMPORT does not attempt to distinguish between
  interrupts physically generated on IRQ9 and those generated on IRQ2.
  If COMPORT sees an interrupt on either IRQ 2 or IRQ9 it reports it as
  being on IRQ 9.  Note that this is because of the vaguaries of the AT
  interrupt structure (If you must know: Hardware-wise, IRQ 2 is used to
  support the slave 8259A, and any IRQ 2 requests result in IRQ 9 interrupt
  assertions.  That's OK, however, because IRQ 9 is software redirected to
  IRQ 2.  Now do you understand why we really can't tell IRQ 2 for IRQ 9?).

  Lastly, if COMPORT can't identify the IRQ a particular serial port is
  connected to, it will report that the IRQ is unknown, as in the following:

          COMPORT V2.5
          Copyright (c) 1993 - OSR Open Systems Resources, Inc.

          Current Port Addresses and Types:
                  COM1: 03F8h, Type=16450, IRQ=4
                  COM2: 02F8h, Type=16450, IRQ=UNKNOWN!
                  COM3: 03E8h, Type=16450, IRQ=5

                  LPT1: 0378h
                  LPT2: 0278h


  We'd like to hear from REGISTERED USERS who see this message, including
  the details of their system configurations.  This is especially true of
  your IRQ is not one of those listed above as being "not checked by COMPORT."


  3.5 /Ln=x -- Configure LPT Port at Specified Address

  The /Ln=x option allows the user to specify the address of any parallel
  port, as well as the LPT number that address is associated with.  This
  information is stored in the DOS BIOS Data Area, and the total number
  of ports of each type are updated in the BIOS Equipment List Word.
  The /Ln=x option functions very similarly to the /Cn=x option.

  For this option, "n" is the number of the LPT port (1-3) and x is the
  hexadecimal address of the associated serial port.  This hex address
  may be specified in one to four hex digits, and must not include any
  "hex identifying" bytes such as "h" or "0x".  Therefore, the hex
  address "02E8" is valid, but "0x02E8" is not and neither is "02E8h".
  Hex address "FFFF" is used to request COMPORT to REMOVE the indicated
  parallel port from the DOS BIOS Data Area tables (see below for this
  special use of /Ln=FFFF).

  When a user specifies a parallel port address using the /Ln=x option,
  COMPORT examines the provided hex port address to see if a device
  exists at that address.  This is done by simply accessing the
  indicated port address with an IN instruction.  Thus, if COMPORT is
  invoked with the command:

          COMPORT /L2=0278

  this requests that COMPORT associate address 0278 (hex) with LPT2, and
  place this information in the DOS BIOS Data Area.  If a device is found
  at this address COMPORT displays a message such as the following:

          COMPORT V2.5
          Copyright (c) 1993 - OSR Open Systems Resources, Inc.

          ...Processing manual port address options...
                  Verified LPT2 at specified address 0278h (added to DOS)

  If no device can be found at the indicated location, COMPORT will not
  add the supplied LPT port address to the BDA.  Instead, a message such
  as the following is displayed:

          COMPORT V2.5
          Copyright (c) 1993 - OSR Open Systems Resources, Inc.

          ...Processing manual port address options...
                  ***ERROR: Did not find LPT2 at specified address 0278h
                                                          (DOS not changed)

  It is important to note that in either case (valid port found, or no valid
  port found) COMPORT informs the user of whether or not the LPT port was
  added to DOS.

  The /Ln=x option can also be used to request COMPORT to remove the
  indicated LPT port number from the DOS internal BIOS Data Area tables (and
  enter a zero in the BDA in its place).  This is done by specifying hex
  address "FFFF", as in:

          COMPORT /L3=FFFF

  In this case, a message similar to the following is displayed:

          COMPORT V2.5
          Copyright (c) 1993 - OSR Open Systems Resources, Inc.

          ...Processing manual port address options...
                  Removed LPT3 from DOS

  COMPORT places no restriction on the number of times a single parallel port
  can be configured into the DOS tables.  Therefore, if, for example, a
  particular piece of software that you use prints to LPT3 and another
  piece of software that you use prints to LPT1, and neither allows you
  to change these specifications, and you wish to use the same printer
  for both (but, obviously not at the same time), you may specify:

          COMPORT /L3=0378

  Where 0378 is the default address for LPT1, and a device exists at this
  location.  COMPORT will display something like the following:

          COMPORT V2.5
          Copyright (c) 1993 - OSR Open Systems Resources, Inc.

          ...Processing manual port address options...
                  Verified LPT3 at specified address 0378h (added to DOS)

          Current Port Addresses and Types:
                  COM1: 03F8h, Type=16450
                  COM2: 02F8h, Type=16450
                  COM3: 03E8h, Type=16450

                  LPT1: 0378h
                  LPT2: 0278h
                  LPT3: 0378h

  Thereby allowing the parallel port at address 0378 to be accessed as
  either LPT1 or LPT3.

  Finally, note that when all LPT port changes are complete, the BIOS Data
  Area Equipment List Word (see /E, above) is updated with the new count of
  the ports configured in the system.  In the example directly above, the
  equipment list word would indicate 3 LPT ports (even though LPT1 and
  LPT3 share the same address).


  3.6 /R=k -- Register COMPORT Using Key

  The /R=k option allows a user to register a previously unregistered
  copy of COMPORT, using a registration key.  This registration key is
  provided by the Author when the registration fee is paid.  The /R=k
  option supersedes all other options on the command line, and prompts
  the user for his name if the registration key is valid.

  Once COMPORT has been registered, your name and registration key will
  be displayed each time the program is started.  Further, the annoying
  "Type <CR> to continue" message, displayed each time COMPORT is run,
  and the reminder to pay your registration fee each time HELP is requested,
  will be removed.

  To register COMPORT, enter the registration key value supplied in
  your registration record, following the /R= option on the command
  line.  Do not supply any notation prefixes (such as 0x) or suffixes
  (such as h).  Also, the media from which COMPORT is running must be
  write-enabled, and you must have write access to the COMPORT image file.
  If your registration key were "17765000" you would use the following
  command to register COMPORT:

          COMPORT /R=17765000

  COMPORT will ignore any other options specified before or after the
  /R on the command line.  When the above command is entered, COMPORT
  will enter its registration procedure, and display something like
  the following:

          COMPORT V2.5
          Copyright (c) 1993 - OSR Open Systems Resources, Inc.

          Owner Registration Procedure
          Exe file name and path: C:\UTILS\COMPORT.EXE

          At the prompt, enter your username EXACTLY as it appears
          on your registration record.
          Username:

  At the above prompt, enter your username exactly as it has been
  returned to you in the registration record.  Note that case, spaces,
  spelling, punctuation, etc are all significant.  If the registration
  key is valid, and it is appropriate for the indicated username,
  COMPORT will display a message like the following:

          THANK YOU for registering COMPORT.
          Keep your registration record in a safe place so that you can
          re-register your copy of COMPORT if necessary.

  If your registration key is invalid, or if it is judged by COMPORT's
  registration procedure to be inappropriate for your username, COMPORT
  will display a message such as the following:

          Registration Key or User Name INCORRECT.

          Please check your data and try again!

          ***ERROR: Registration procedure FAILED.

          ***PLEASE register COMPORT!

  When the key is invalid, COMPORT remains unchanged.  Thus if you have
  been running the shareware version of COMPORT, or a previously registered
  version of COMPORT, you may continue to run that version unchanged).

  If you're having trouble registering COMPORT after receiving a valid
  registration key from OSR Open Systems Resources, recheck the following
  points:

          o Do you have write access to the COMPORT.EXE file?  You must
                  have write access for COMPORT to be successfully
                  registered.

          o Have you entered your registration key precisely as supplied
                  on your registration record?

          o Have you entered your username precisely as it was printed
                  on your registration record?  Spaces, spelling, and
                  punctuation all must be precisely identical to the way
                  they appear in your username on the registration record.


  3.7 /S -- Scan for Ports at Default Addresses

  When the /S option is enabled, if COMPORT finds fewer than 4 COM ports
  and fewer than 3 LPT ports configured by DOS, COMPORT will search for
  additional ports at the addresses listed below (which have not already
  been located by DOS).  As these additional ports are found, they are added
  to the DOS BIOS Data Area and the counts in the BIOS Equipment List Word
  are adjusted accordingly.  Please see section 2.0 "DOS Communications
  Background" for more information on the BDA and COM/LPT to physical
  port address mapping.

  The serial port addresses that COMPORT searches, in order, are:

                  03F8h, 02F8h, 03E8h, 02E8h

  The parallel port addresses that COMPORT searches, in order, are:

                  03BCh, 0378h, 0278h

  Addresses supplied using the /Cn=x and /Ln=x options override the
  default port addresses used by the /S option.

  When COMPORT is executed with /S enabled, output similar to the
  following is produced:

          COMPORT V2.5
          Copyright (c) 1993 - OSR Open Systems Resources, Inc.

          ...Scanning for additional serial ports at default addresses...
                  Found COM4: at address 02E8h (added to DOS)
          ...Scanning for additional parallel ports at default addresses
                  Found LPT2 at address 0278h (added to DOS)

          Current Port Addresses and Types:
                  COM1: 03F8h, Type=16450
                  COM2: 02F8h, Type=16450
                  COM3: 03E8h, Type=16450
                  COM4: 02E8h, Type=16550AFN

                  LPT1: 0378h
                  LPT2: 0278h

  4.0  CHANGES: From V2.0:
           - Major bug-fixes and enhancements to IRQ identification
             (/I option), based on wide-spread testing and user feedback.
             Now identified IRQ2/9 devices, and avoids hanging at all
             costs!
           - UART identification code now avoids changing IE bits
             in UART.
           - Made LANtastic aware.

